import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:sweetim/view/chat_details_view.dart';

import '../model/friends.dart';

class FriendsDetails extends StatelessWidget {
  final Friends friends;

  const FriendsDetails({required this.friends, Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text("昵称：${friends.name ?? ""}"),
            ElevatedButton(onPressed: () => Get.to(ChatDetails(friends: friends)), child: Text("开始聊天"))
          ],
        ),
      ),
    );
  }
}
